package top.infopub.mgr.cap.service;

import java.util.List;

import top.infopub.generic.GenericService;
import top.infopub.mgr.cap.domain.LoanFinDomain;
import top.infopub.mgr.cap.vo.LoanFinVo;
import top.infopub.mgr.common.vo.RspVo;
import top.infopub.model.cap.*;

import com.github.pagehelper.Page;
import top.infopub.model.mkt.ProjectAttachment;
import top.infopub.security.vo.AuthorizationVO;

public interface LoanFinService extends GenericService<LoanFin, String> {

    /**
     * 根据条件查询融资放款记录
     * @param LoanFinVo
     * @return
     * @see
     */
    Page<LoanFinDomain> selectByDomainWhere(Page<LoanFinDomain> page,LoanFinVo loanFinVo);

    /**
     * 根据条件查询融资放款记录-我审批的
     * @param LoanFinVo
     * @return
     * @see
     */
    Page<LoanFinDomain> selectMyCheckByDomainWhere(Page<LoanFinDomain> page,LoanFinVo loanFinVo);

    /**
     * 添加-融资放款
     */
    void saveLoanFin(LoanFin loanFin, List<LoanFinDetail> loanFinDetails,
                     List<LoanFinBank> loanFinBanks, List<LoanFinAtt> loanFinAtts);

    /**
     * 根据融资放款id查询详情
     * @param id 主键id
     * @return
     * @see
     */
    LoanFinVo selectById(String id);

    /**
     * 查询融资放款信息
     */
    List<LoanFin> queryAll();

    /**
     * 查询融资放款的项目 -- 且已关联项目公司
     */
    List<LoanFin> queryAllWithOrg();

    /**
     * 根据单据编号和项目编号查询融资放款
     */
    LoanFin selectByProCode(String proCode,String codes);

    RspVo queryById(String id);

    RspVo saveAll(AuthorizationVO userDtl, LoanFinVo loanFinVo, SetupFinancial setupFinancial, List<ProjectAttachment> attachmentList, String bodyStr, Integer submitType);

    RspVo financialDetail(String id);

    RspVo modifyFinInfo(LoanFin loanFin, AuthorizationVO vo, String processId);
}
